import { IFeidaoAiWeappPage } from '@dfeidao/atom-wxapp/interfaces';
import get_local from '@dfeidao/atom-wxapp/local/get';
import nodejs from '@dfeidao/atom-wxapp/msg/nodejs';
import showLoadling from '@dfeidao/atom-wxapp/api/interaction/show-loading';
// import { send_msg as url } from '../atom/config';
import batch_push from '@dfeidao/atom-wxapp/msg/batch-push';

export default async function a008(fd: IFeidaoAiWeappPage, ...args: any[]) {
	// todo
	showLoadling('推送中');
	const equip_no = get_local(fd, 'equip_no') as string;
	const data = await nodejs<any>('app-sessionId', {
		equip_no
	});
	console.log(data);
	const a = await batch_push([{
		ToId: data.sessionId,
		BusinessKey: "self_sell",
		ControlParam: {
			modeno: "1",
			targetcompntno: "ZJ201707280000000295",
			replacecompntno: "ZJ201707280000000295",
			compntparam: {}
		}
	}]);
	console.log(a, '----------------ts---------------')
}
